home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 May / Chip Mayıs 2001.iso / prog / share / 14 / setup.exe / %MAINDIR% / Scripts / Perl script sample 1.pl < prev    next >
Encoding:
Perl Script  |  2001-03-30  |  813 b   |  32 lines

  1. #!C:\\perl\\bin\\perl.exe
  2. # Created: February 12, 2001
  3. # Sample Script To Use The TEConnection Object.
  4.  
  5. use OLE;
  6.  
  7.     #Create TEConnection Object.
  8.     my $Kyle = CreateObject OLE "CuteFTPPro.TEConnection";
  9.      
  10.     #Specify Connection Properties
  11.     $Kyle->{Protocol} = 'FTP';
  12.     $Kyle->{Host} = 'kyle.globalscape.com';
  13.     $Kyle->{Port} = '21';
  14.     $Kyle->{Login} = 'anonymous';
  15.     $Kyle->{Password} = 'anonymous@somewhere.com';
  16.     $Kyle->{TransferType} = 'AUTO';
  17.     $Kyle->{RemoteFolder} = '/pub';
  18.     $Kyle->{LocalFolder} = "C:\\";
  19.     
  20.     #Grab The Latest Version Of CuteZIP
  21.     if (!$Kyle->RemoteExists('/pub/cutezip/cutezip.exe'))
  22.     {
  23.         print "Remote file does not exist\n";
  24.         exit(1);
  25.     }
  26.     else
  27.     {
  28.         #Start Download.
  29.         $Kyle->Download('/pub/cutezip/cutezip.exe', "C:\\cutezip.exe");
  30.     }
  31.         
  32.